#ifndef LAURIN_DISCOVER_NETWORK_CLIENTS_MODULE_H_
#define LAURIN_DISCOVER_NETWORK_CLIENTS_MODULE_H_

#include "laurin-module.h"
#include "laurin-ip-network.h"
#include "laurin-network-device.h"
#include <glibmm/ustring.h>
#include <pcap.h>



void processFrameExtForClients(u_char* arg, const struct pcap_pkthdr *header,const u_char *data);


class LaurinDiscoverNetworkClientsModule : public LaurinModule
{

	friend void processFrameExtForClients(u_char* arg, const struct pcap_pkthdr *header,const u_char *data);

	public:

		LaurinDiscoverNetworkClientsModule(const Glib::ustring& ifaceName);
		virtual ~LaurinDiscoverNetworkClientsModule();

		bool isInitialized();
		void setFrameTimeout(int millisecond);
		int getFrameTimeout() const;

		LaurinIPNetwork* getNetwork() const;


	protected:

		virtual void run();
		virtual void innerStop();


	private:

		void processFrame(const struct pcap_pkthdr *header,const u_char *data);

		LaurinNetworkDevice* _device;
		int _timeout;

};

#endif
